On the size of parsers and LR(k)-grammars

نویسندگان

  • Hing Leung
  • Detlef Wotschke
چکیده

In this paper, we consider two tradeo results regarding the economy of description in parsing. One result is on the tradeo between the size of a parser and its ability to detect an error early. The other result is on the tradeo between the size of an LR(k)-grammar and the length k of the lookahead. c © 2000 Elsevier Science B.V. All rights reserved.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Simple LR ( k ) Grammars Franklin

A class of context-free grammars, called the "Simple LR(k)" or SLR(k) grammars is defined. This class has been shown to include weak precedence and simple precedence grammars as proper subsets. How to construct parsers for the SLR(k) grammars is also shown. These parser-construction techniques are extendible to cover all of the LR(k) grammars of Knuth; they have been implemented and by direct c...

متن کامل

Eine Rekonstruktion der LR-Theorie zur Elimination von Redundanz mit Anwendung auf den Bau von ELR-Parsern

In this thesis, we present work on two problems from the field of LR parser construction, a family of syntax analysis techniques for context-free languages. In the first part, we show that the traditional LR parser construction technique produces parsers which are burdened with a substantial amount of systematic redundance. We develop a new and well-founded method which defines what we call gen...

متن کامل

Generating Eecient Substring Parsers for Brc Grammars

The concept of Bounded Context Parseable grammars is a less restricted variation of Bounded Context grammars a class of grammars that is especially suited for substring parsing. Robust parsing is introduced as a special form of parsing for BCP grammars. The di erences between robust parsing and LR(k) parsing are explored. A method of generating robust parsers is presented and complemented by pe...

متن کامل

Cleaned SLL(1) Grammars are SLR(1)

We establish the following specific relation between contextfree grammars that have LL(k) and LR(k) parsers, respectively: after cleaning an SLL(1) grammar (by unfolding its empty productions), the resulting grammar is SLR(1).

متن کامل

Faster Generalized LR Parsing

Tomita devised a method of generalized LR (GLR) parsing to parse ambiguous grammars e ciently. A GLR parser uses linear-time LR parsing techniques as long as possible, falling back on more expensive general techniques when necessary. Much research has addressed speeding up LR parsers. However, we argue that this previous work is not transferable to GLR parsers. Instead, we speed up LR parsers b...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Theor. Comput. Sci.

دوره 242  شماره 

صفحات  -

تاریخ انتشار 2000